package com.bridgeintelligent.tag.scene.controller;

import com.bridgeintelligent.tag.scene.api.ISceneFuncService;

import com.bridgeintelligent.tag.scene.api.dto.SceneDto;
import com.bridgeintelligent.tag.scene.api.vo.*;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @description
 * @author: grp 2021-01-07 11:15
 **/

@Api(tags = "场景功能下拉列表")
@RestController
@AllArgsConstructor
@Validated
@Slf4j
@RequestMapping("api/scenefunc")
public class SceneFunctionController {

    private ISceneFuncService service;

    @ApiOperation(value = "客群", notes = "场景管理")
    @GetMapping("customers")
    public SceneDto<List<FuncVO>> customers() {
        return SceneDto.success(service.findCustomers());
    }

    @ApiOperation(value = "组合标签", notes = "场景管理")
    @GetMapping("combinations")
    public SceneDto<List<FuncVO>> combinations() {
        return SceneDto.success(service.findCombinations());
    }

    @ApiOperation(value = "定制标签", notes = "场景管理")
    @GetMapping("frees")
    public SceneDto<List<FuncVO>> frees() {
        return SceneDto.success(service.findFrees());
    }

    @ApiOperation(value = "定制宏观画像", notes = "场景管理")
    @GetMapping("explores")
    public SceneDto<List<FuncVO>> explores() {
        return SceneDto.success(service.findExplores());
    }

    @ApiOperation(value = "导出下载", notes = "场景管理")
    @GetMapping("exports")
    public SceneDto<List<FuncVO>> exports() {
        return SceneDto.success( service.findExports());
    }

    @ApiOperation(value = "LOOKLIKE客群", notes = "场景管理")
    @GetMapping("loolikes")
    public SceneDto<List<FuncVO>> loolikes() {
        return SceneDto.success( service.findLooklikes());
    }

    @ApiOperation(value = "客群追踪", notes = "场景管理")
    @GetMapping("customersTrack")
    public SceneDto<List<FuncVO>> customersTrack() {
        return SceneDto.success( service.findCustomersTracks());
    }

}
